create procedure proc_5
	@id Int,
	@Nev nVarChar (30),
	@Megy nVarChar (30),
	@idele nVarChar (30)
As declare
	@v Int
begin
set @v = (Select IdeiglenesLerakatokID 
			from IdeiglenesLerakatok i 
		where i.Nev = @idele)
	Update Telepulesek
	set TelepulesNeve = @Nev, Megye = @Megy,IdeiglenesLerakatokID =@v
	where @id = TelepulesId
end
	